<template>
	<view class="noviceHelp">
		<view class="item-box" v-for="(item,index) in helpList" :key="index" @tap="goPage(item)">
			<view class="i-title">{{item.title}}</view>
			<view class="i-time">{{item.created_at}}</view>
		</view>
		<m-bottom></m-bottom>
	</view>
</template>

<script>
	export default{
		name:"noviceHelp",
		data(){
			return {
				helpList: [],
				page: 1,
				is_load: 0
			}
			},
		onShow(){
			this.getHelpList()
		},
		methods:{
			goPage(item){
				this.$router.push({
					route:this.$routesConfig.helpDetail,
					query:{id:item.id}
				})
			},
			async getHelpList(){
				let resData=await this.$apis.getHelpList()
				this.helpList.push(...resData.data.lists)
				this.is_load=resData.data.is_load
			}
		},
		onReachBottom(){
			if(this.is_load>0){
				this.page++
				this.$store.commit("CHANGESHOWlOADING",true)
				setTimeout(()=>{
					this.$store.commit("CHANGESHOWlOADING",false)
				},1000)
			}

		},
	}
</script>

<style scoped lang="less">
	.noviceHelp{
		box-sizing: border-box;
		padding: 0 20rpx;

		.item-box{
			padding-top: 40rpx;
			border-bottom: solid 1px #C8C7CC;
			.i-title{
				font-size: 30rpx;
				color: #333333;
				font-weight: bold;
				// line-height: 80rpx;
			}
			.i-time{
				font-size: 24rpx;
				color: gray;
				line-height: 80rpx;
			}
		}
	}
</style>
